﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:54:06
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.CMS
{
	/// <summary>
	/// 主题
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("主题")]
	[BindTable("Theme", Description = "主题", ConnName = "CMS", DbType = DatabaseType.SqlServer)]
	public partial class Theme
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _SiteID;
		/// <summary>
		/// 站点编号
		/// </summary>
		[Description("站点编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(2, "SiteID", "站点编号", "", "int", 10, 0, false)]
		public Int32 SiteID
		{
			get { return _SiteID; }
			set { if (OnPropertyChange("SiteID", value)) _SiteID = value; }
		}

		private Int32 _ForumID;
		/// <summary>
		/// 论坛编号
		/// </summary>
		[Description("论坛编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "ForumID", "论坛编号", "", "int", 10, 0, false)]
		public Int32 ForumID
		{
			get { return _ForumID; }
			set { if (OnPropertyChange("ForumID", value)) _ForumID = value; }
		}

		private String _Subject;
		/// <summary>
		/// 主体
		/// </summary>
		[Description("主体")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(4, "Subject", "主体", "", "nvarchar(100)", 0, 0, true)]
		public String Subject
		{
			get { return _Subject; }
			set { if (OnPropertyChange("Subject", value)) _Subject = value; }
		}

		private String _IPAddress;
		/// <summary>
		/// 地址地址
		/// </summary>
		[Description("地址地址")]
		[DataObjectField(false, false, true, 20)]
		[BindColumn(5, "IPAddress", "地址地址", "", "nvarchar(20)", 0, 0, true)]
		public String IPAddress
		{
			get { return _IPAddress; }
			set { if (OnPropertyChange("IPAddress", value)) _IPAddress = value; }
		}

		private Boolean _Type;
		/// <summary>
		/// 类型
		/// </summary>
		[Description("类型")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(6, "Type", "类型", "", "bit", 0, 0, false)]
		public Boolean Type
		{
			get { return _Type; }
			set { if (OnPropertyChange("Type", value)) _Type = value; }
		}

		private Boolean _Status;
		/// <summary>
		/// 状态
		/// </summary>
		[Description("状态")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(7, "Status", "状态", "", "bit", 0, 0, false)]
		public Boolean Status
		{
			get { return _Status; }
			set { if (OnPropertyChange("Status", value)) _Status = value; }
		}

		private String _LastPost;
		/// <summary>
		/// 最后发布
		/// </summary>
		[Description("最后发布")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(8, "LastPost", "最后发布", "", "nvarchar(100)", 0, 0, true)]
		public String LastPost
		{
			get { return _LastPost; }
			set { if (OnPropertyChange("LastPost", value)) _LastPost = value; }
		}

		private String _LastPoster;
		/// <summary>
		/// 最后发布错误
		/// </summary>
		[Description("最后发布错误")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(9, "LastPoster", "最后发布错误", "", "nvarchar(100)", 0, 0, true)]
		public String LastPoster
		{
			get { return _LastPoster; }
			set { if (OnPropertyChange("LastPoster", value)) _LastPoster = value; }
		}

		private Int32 _ViewCount;
		/// <summary>
		/// 视图数量
		/// </summary>
		[Description("视图数量")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(10, "ViewCount", "视图数量", "", "int", 10, 0, false)]
		public Int32 ViewCount
		{
			get { return _ViewCount; }
			set { if (OnPropertyChange("ViewCount", value)) _ViewCount = value; }
		}

		private Int32 _ReplyCount;
		/// <summary>
		/// 评论数量
		/// </summary>
		[Description("评论数量")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(11, "ReplyCount", "评论数量", "", "int", 10, 0, false)]
		public Int32 ReplyCount
		{
			get { return _ReplyCount; }
			set { if (OnPropertyChange("ReplyCount", value)) _ReplyCount = value; }
		}

		private Int32 _OrderFlag;
		/// <summary>
		/// 订单标记
		/// </summary>
		[Description("订单标记")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(12, "OrderFlag", "订单标记", "", "int", 10, 0, false)]
		public Int32 OrderFlag
		{
			get { return _OrderFlag; }
			set { if (OnPropertyChange("OrderFlag", value)) _OrderFlag = value; }
		}

		private Boolean _VerifyFlag;
		/// <summary>
		/// 验证标记
		/// </summary>
		[Description("验证标记")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(13, "VerifyFlag", "验证标记", "", "bit", 0, 0, false)]
		public Boolean VerifyFlag
		{
			get { return _VerifyFlag; }
			set { if (OnPropertyChange("VerifyFlag", value)) _VerifyFlag = value; }
		}

		private Boolean _TopTheme;
		/// <summary>
		/// 顶部主题
		/// </summary>
		[Description("顶部主题")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(14, "TopTheme", "顶部主题", "", "bit", 0, 0, false)]
		public Boolean TopTheme
		{
			get { return _TopTheme; }
			set { if (OnPropertyChange("TopTheme", value)) _TopTheme = value; }
		}

		private Boolean _Best;
		/// <summary>
		/// 最好
		/// </summary>
		[Description("最好")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(15, "Best", "最好", "", "bit", 0, 0, false)]
		public Boolean Best
		{
			get { return _Best; }
			set { if (OnPropertyChange("Best", value)) _Best = value; }
		}

		private String _Bright;
		/// <summary>
		/// 明亮
		/// </summary>
		[Description("明亮")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(16, "Bright", "明亮", "", "nvarchar(100)", 0, 0, true)]
		public String Bright
		{
			get { return _Bright; }
			set { if (OnPropertyChange("Bright", value)) _Bright = value; }
		}

		private Boolean _Applydel;
		/// <summary>
		/// 申请删除
		/// </summary>
		[Description("申请删除")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(17, "Applydel", "申请删除", "", "bit", 0, 0, false)]
		public Boolean Applydel
		{
			get { return _Applydel; }
			set { if (OnPropertyChange("Applydel", value)) _Applydel = value; }
		}

		private DateTime _LastPostTime;
		/// <summary>
		/// 最后时间
		/// </summary>
		[Description("最后时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(18, "LastPostTime", "最后时间", "", "datetime2", 7, 0, false)]
		public DateTime LastPostTime
		{
			get { return _LastPostTime; }
			set { if (OnPropertyChange("LastPostTime", value)) _LastPostTime = value; }
		}

		private DateTime _OrderTime;
		/// <summary>
		/// 订单时间
		/// </summary>
		[Description("订单时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(19, "OrderTime", "订单时间", "", "datetime2", 7, 0, false)]
		public DateTime OrderTime
		{
			get { return _OrderTime; }
			set { if (OnPropertyChange("OrderTime", value)) _OrderTime = value; }
		}

		private String _prop1;
		/// <summary>
		/// 属性1
		/// </summary>
		[Description("属性1")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(20, "prop1", "属性1", "", "nvarchar(50)", 0, 0, true)]
		public String prop1
		{
			get { return _prop1; }
			set { if (OnPropertyChange("prop1", value)) _prop1 = value; }
		}

		private String _prop2;
		/// <summary>
		/// 属性2
		/// </summary>
		[Description("属性2")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(21, "prop2", "属性2", "", "nvarchar(50)", 0, 0, true)]
		public String prop2
		{
			get { return _prop2; }
			set { if (OnPropertyChange("prop2", value)) _prop2 = value; }
		}

		private String _prop3;
		/// <summary>
		/// 属性3
		/// </summary>
		[Description("属性3")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(22, "prop3", "属性3", "", "nvarchar(50)", 0, 0, true)]
		public String prop3
		{
			get { return _prop3; }
			set { if (OnPropertyChange("prop3", value)) _prop3 = value; }
		}

		private String _prop4;
		/// <summary>
		/// 属性4
		/// </summary>
		[Description("属性4")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(23, "prop4", "属性4", "", "nvarchar(50)", 0, 0, true)]
		public String prop4
		{
			get { return _prop4; }
			set { if (OnPropertyChange("prop4", value)) _prop4 = value; }
		}

		private String _AddUser;
		/// <summary>
		/// 添加用户
		/// </summary>
		[Description("添加用户")]
		[DataObjectField(false, false, false, 100)]
		[BindColumn(24, "AddUser", "添加用户", "", "nvarchar(100)", 0, 0, true)]
		public String AddUser
		{
			get { return _AddUser; }
			set { if (OnPropertyChange("AddUser", value)) _AddUser = value; }
		}

		private DateTime _AddTime;
		/// <summary>
		/// 添加时间
		/// </summary>
		[Description("添加时间")]
		[DataObjectField(false, false, false, 7)]
		[BindColumn(25, "AddTime", "添加时间", "", "datetime2", 7, 0, false)]
		public DateTime AddTime
		{
			get { return _AddTime; }
			set { if (OnPropertyChange("AddTime", value)) _AddTime = value; }
		}

		private String _ModifyUser;
		/// <summary>
		/// 修改用户
		/// </summary>
		[Description("修改用户")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(26, "ModifyUser", "修改用户", "", "nvarchar(100)", 0, 0, true)]
		public String ModifyUser
		{
			get { return _ModifyUser; }
			set { if (OnPropertyChange("ModifyUser", value)) _ModifyUser = value; }
		}

		private DateTime _ModifyTime;
		/// <summary>
		/// 修改时间
		/// </summary>
		[Description("修改时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(27, "ModifyTime", "修改时间", "", "datetime2", 7, 0, false)]
		public DateTime ModifyTime
		{
			get { return _ModifyTime; }
			set { if (OnPropertyChange("ModifyTime", value)) _ModifyTime = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(28, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(29, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(30, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(31, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "SiteID" : return _SiteID;
					case "ForumID" : return _ForumID;
					case "Subject" : return _Subject;
					case "IPAddress" : return _IPAddress;
					case "Type" : return _Type;
					case "Status" : return _Status;
					case "LastPost" : return _LastPost;
					case "LastPoster" : return _LastPoster;
					case "ViewCount" : return _ViewCount;
					case "ReplyCount" : return _ReplyCount;
					case "OrderFlag" : return _OrderFlag;
					case "VerifyFlag" : return _VerifyFlag;
					case "TopTheme" : return _TopTheme;
					case "Best" : return _Best;
					case "Bright" : return _Bright;
					case "Applydel" : return _Applydel;
					case "LastPostTime" : return _LastPostTime;
					case "OrderTime" : return _OrderTime;
					case "prop1" : return _prop1;
					case "prop2" : return _prop2;
					case "prop3" : return _prop3;
					case "prop4" : return _prop4;
					case "AddUser" : return _AddUser;
					case "AddTime" : return _AddTime;
					case "ModifyUser" : return _ModifyUser;
					case "ModifyTime" : return _ModifyTime;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "SiteID" : _SiteID = Convert.ToInt32(value); break;
					case "ForumID" : _ForumID = Convert.ToInt32(value); break;
					case "Subject" : _Subject = Convert.ToString(value); break;
					case "IPAddress" : _IPAddress = Convert.ToString(value); break;
					case "Type" : _Type = Convert.ToBoolean(value); break;
					case "Status" : _Status = Convert.ToBoolean(value); break;
					case "LastPost" : _LastPost = Convert.ToString(value); break;
					case "LastPoster" : _LastPoster = Convert.ToString(value); break;
					case "ViewCount" : _ViewCount = Convert.ToInt32(value); break;
					case "ReplyCount" : _ReplyCount = Convert.ToInt32(value); break;
					case "OrderFlag" : _OrderFlag = Convert.ToInt32(value); break;
					case "VerifyFlag" : _VerifyFlag = Convert.ToBoolean(value); break;
					case "TopTheme" : _TopTheme = Convert.ToBoolean(value); break;
					case "Best" : _Best = Convert.ToBoolean(value); break;
					case "Bright" : _Bright = Convert.ToString(value); break;
					case "Applydel" : _Applydel = Convert.ToBoolean(value); break;
					case "LastPostTime" : _LastPostTime = Convert.ToDateTime(value); break;
					case "OrderTime" : _OrderTime = Convert.ToDateTime(value); break;
					case "prop1" : _prop1 = Convert.ToString(value); break;
					case "prop2" : _prop2 = Convert.ToString(value); break;
					case "prop3" : _prop3 = Convert.ToString(value); break;
					case "prop4" : _prop4 = Convert.ToString(value); break;
					case "AddUser" : _AddUser = Convert.ToString(value); break;
					case "AddTime" : _AddTime = Convert.ToDateTime(value); break;
					case "ModifyUser" : _ModifyUser = Convert.ToString(value); break;
					case "ModifyTime" : _ModifyTime = Convert.ToDateTime(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得主题字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 站点编号
			///</summary>
			public const String SiteID = "SiteID";

			///<summary>
			/// 论坛编号
			///</summary>
			public const String ForumID = "ForumID";

			///<summary>
			/// 主体
			///</summary>
			public const String Subject = "Subject";

			///<summary>
			/// 地址地址
			///</summary>
			public const String IPAddress = "IPAddress";

			///<summary>
			/// 类型
			///</summary>
			public const String Type = "Type";

			///<summary>
			/// 状态
			///</summary>
			public const String Status = "Status";

			///<summary>
			/// 最后发布
			///</summary>
			public const String LastPost = "LastPost";

			///<summary>
			/// 最后发布错误
			///</summary>
			public const String LastPoster = "LastPoster";

			///<summary>
			/// 视图数量
			///</summary>
			public const String ViewCount = "ViewCount";

			///<summary>
			/// 评论数量
			///</summary>
			public const String ReplyCount = "ReplyCount";

			///<summary>
			/// 订单标记
			///</summary>
			public const String OrderFlag = "OrderFlag";

			///<summary>
			/// 验证标记
			///</summary>
			public const String VerifyFlag = "VerifyFlag";

			///<summary>
			/// 顶部主题
			///</summary>
			public const String TopTheme = "TopTheme";

			///<summary>
			/// 最好
			///</summary>
			public const String Best = "Best";

			///<summary>
			/// 明亮
			///</summary>
			public const String Bright = "Bright";

			///<summary>
			/// 申请删除
			///</summary>
			public const String Applydel = "Applydel";

			///<summary>
			/// 最后时间
			///</summary>
			public const String LastPostTime = "LastPostTime";

			///<summary>
			/// 订单时间
			///</summary>
			public const String OrderTime = "OrderTime";

			///<summary>
			/// 属性1
			///</summary>
			public const String prop1 = "prop1";

			///<summary>
			/// 属性2
			///</summary>
			public const String prop2 = "prop2";

			///<summary>
			/// 属性3
			///</summary>
			public const String prop3 = "prop3";

			///<summary>
			/// 属性4
			///</summary>
			public const String prop4 = "prop4";

			///<summary>
			/// 添加用户
			///</summary>
			public const String AddUser = "AddUser";

			///<summary>
			/// 添加时间
			///</summary>
			public const String AddTime = "AddTime";

			///<summary>
			/// 修改用户
			///</summary>
			public const String ModifyUser = "ModifyUser";

			///<summary>
			/// 修改时间
			///</summary>
			public const String ModifyTime = "ModifyTime";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}